home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
BBS in a Box 7
/
BBS in a Box - Macintosh - Volume VII (BBS in a Box) (January 1993).iso
/
Files
/
Prog
/
M
/
MacOberon241.cpt
/
MacOberon 2.4(1)
/
Test.Mod
(
.txt
)
< prev
next >
Wrap
Oberon Text
|
1991-10-17
|
2KB
|
32 lines
Syntax10.Scn.Fnt
Syntax10b.Scn.Fnt
Syntax10i.Scn.Fnt
MODULE Test; (* Simple Example *)
IMPORT
Texts, Oberon;
W: Texts.Writer;
PROCEDURE Do*;
BEGIN
Texts.WriteString(W, "Hello World"); Texts.WriteLn(W);
Texts.Append(Oberon.Log, W.buf)
END Do;
BEGIN
Texts.OpenWriter(W)
END Test.
1. Move the cursor into this viewer and press the Enter key on the keypad.
This will cause the viewer to be marked (a star will appear).
2. Execute the command Compiler.Compile * (press control key over it).
A star as a parameter always indicates the marked viewer.
3. You may now invoke the new command Test.Do as often as you like.
Just move the mouse cursor over it and press control.
4. Modify the program, for example by changing the text that is printed.
5. Compile again by invoking Compiler.Compile * as usual.
6. Execute Test.Do again: the changes you made in the program have no
effect (yet), because the old version of module Test is still loaded.
7. You may (re-)load the latest version of a command by interclicking the
mouse button during invocation (pressing the control key).
8. Error positions in the text may be located by selecting the error message
"pos ... err ..." in the System.Log and executing Edit.Locate .
Selecting the first character on the line is sufficient. The whole line
may also be selected by double-clicking.